var script_array = ["../FrontFrame/jquery-3.3.1.min.js",
					"https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js",
					"https://cdn.bootcss.com/popper.js/1.12.9/umd/popper.min.js",
                    "../FrontFrame/md5.js"];
var css_array = ["https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"];

for ( var i = 0; i < css_array.length; i++) {
	document.write('<link rel="stylesheet" type="text/css" href="'+ css_array[i] + '">');
}
for ( var i = 0; i < script_array.length; i++) {
	document.write('<script language=javascript src="'+ script_array[i] + '"></script>');
}

function getRootPath() {
    // 获取当前网址，如： http://localhost:8083/uimcardprj/share/meun.jsp
    var curWwwPath = window.document.location.href;
    // 获取主机地址之后的目录，如： uimcardprj/share/meun.jsp
    var pathName = window.document.location.pathname;
    var pos = curWwwPath.indexOf(pathName);
    // 获取主机地址，如： http://localhost:8083
    var localhostPaht = curWwwPath.substring(0, pos);
    // 获取带"/"的项目名，如：/uimcardprj
    var projectName = pathName
        .substring(0, pathName.substr(1).indexOf('/') + 1);
    return (localhostPaht+'/');
}

//时间戳转换
function formatDate(now) {
    var times=parseInt(now)
    var d=new Date(times);
    var year=d.getFullYear();
    var month=d.getMonth()+1;
    var date=d.getDate();
    var hour=d.getHours();
    var minute=d.getMinutes();
    var second=d.getSeconds();
    return year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second;
}

function inputdate(){
    var now = new Date();
//格式化日，如果小于9，前面补0
    var day = ("0" + now.getDate()).slice(-2);
//格式化月，如果小于9，前面补0
    var month = ("0" + (now.getMonth() + 1)).slice(-2);
//拼装完整日期格式
    var today = now.getFullYear()+"-"+(month)+"-"+(day) ;
//完成赋值
    return today;
}